import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.LinkedList;
import java.util.Queue;


public class Client {
        
        public static void main(String[] args) throws UnknownHostException, IOException, ClassNotFoundException{
                InetAddress host = InetAddress.getLocalHost();
                System.out.println(host);
                Socket client = new Socket("127.0.0.1",3001);
                FileWriter file = new FileWriter("ChatList.txt",true);
                SocketChat sc = new SocketChat(client,file);
                sc.chat();

//              client.close();
//              client.close();
                
        }
}
